home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / bmenu54.zip / NESTED.BAT < prev    next >
DOS Batch File  |  1990-02-12  |  428b  |  34 lines

  1. echo off
  2. echo.
  3. echo Example with menu definition nested within the batch file
  4. echo.
  5. goto main
  6.  
  7. ; Menu Def below
  8.  
  9. $menu1
  10. 5
  11. 40
  12. Title
  13. Choices
  14. Choice 2
  15. $end_menu
  16.  
  17. ; Batch file below
  18.  
  19. :main
  20. bmenu @nested.bat menu1
  21. echo.
  22. if errorlevel 2 goto 2
  23. if errorlevel 1 goto 1
  24. if errorlevel 0 goto esc
  25. :2
  26. echo Choice 2 was made
  27. goto end
  28. :1
  29. echo Choices was selected
  30. goto end
  31. :esc
  32. echo User hit ESC or ^C 
  33. :end
  34.